var mongoose = require('mongoose');
var Schema = mongoose.Schema;

// 用户文件
var UserSchema = new Schema({
    username: {type: String}, // 用户名
    password: {type: String}, // 用户ID
    create_at: {type: Date, default: Date.now} // 创建时间
});

UserSchema.index({username: 1}, {unique: true});

mongoose.model('User', UserSchema);